package com.example.schedule.viewmodel

import com.example.schedule.base.MvRxViewModel
import com.example.schedule.repository.model.Schedule
import com.example.schedule.repository.model.ScheduleList

/**
 *Create by Fanketly on 2021/10/31
 *Gitee:https://gitee.com/fanketly
 */
class ScheduleViewModel(initialState: ScheduleList) :
    MvRxViewModel<ScheduleList>(initialState) {
    fun addSchedule() {
        withState {
            setState {
                copy(scheduleList = it.scheduleList + Schedule())
            }
        }
    }
}